package databaseConnection;
import java.sql.*;

public class DBConnect {
	
	Statement statement = null;
	public DBConnect(){
		Connection con = null;
		try {
			Class.forName("com.mysql.jdbc.Driver").newInstance();
			con = DriverManager.getConnection("jdbc:mysql://localhost:3306/aimsfirstconsultdb","root", "");			
			System.out.println("Successfully connected to database");
			statement = con.createStatement();
		} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}
	
	public Statement getStatement(){
		return statement;
	}
}